package com.yuntai.pms.model.enums;


import java.util.LinkedHashMap;
import java.util.Map;

public enum LimitFlowType {

    CONCURRENTTHREAD(0, "并发线程数流量"),
    QPS(1, "QPS流量");

    private Integer code;
    private String name;
    private final  static Map<Integer,String> limitFlowTypeMap = new LinkedHashMap<Integer,String>();

    public static Map<Integer, String> getLimitFlowTypeMap() { return limitFlowTypeMap;
    }
    static   {
        limitFlowTypeMap.put(LimitFlowType.CONCURRENTTHREAD.getCode(), LimitFlowType.CONCURRENTTHREAD.getName());
        limitFlowTypeMap.put(LimitFlowType.QPS.getCode(), LimitFlowType.QPS.getName());
    }
    private LimitFlowType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
